package com.itheima.scanner;

import java.util.Scanner;

/**
 * @author jiangxun
 * @date 11-14-2024
 */
public class ScannerDemo1 {
    public static void main(String[] args) {
        printUserInfo();
    }

    private static void printUserInfo() {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入用户名:");
        String username=sc.nextLine();
        System.out.println("您叫："+username);
        System.out.println("请输入年龄:");
        int age=sc.nextInt();
        System.out.println("您的年龄是："+age);
    }
}
